import { io } from './io'

export const queryConfigInfo = () =>
    io<Api.Config.AllConfig>({
        url: '/api/v1/rateconfig/info',
        method: 'GET'
    })

export const updateMasterCardConfig = (data: Api.Config.MasterCardConfig) =>
    io<boolean>({
        url: '/api/v1/rateconfig/mastercard/setting',
        method: 'POST',
        data
    })

export const updateTransferCardConfig = (data: Api.Config.TransferCardConfig) =>
    io<boolean>({
        url: '/api/v1/rateconfig/transfercard/setting',
        method: 'POST',
        data
    })

export const updateWalletConfig = (data: Api.Config.WalletConfig) =>
    io<Api.Config.AllConfig>({
        url: '/api/v1/rateconfig/wallet/setting',
        method: 'POST',
        data
    })

export const updateAgencyrebateConfig = (data: Api.Config.AgencyrebateConfig) =>
    io<Api.Config.AllConfig>({
        url: '/api/v1/rateconfig/agencyrebate/setting',
        method: 'POST',
        data
    })
